<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<a id='myId'>test001</a>
	<script type="text/javascript">
		var a = "测试中文件";
		var url = "b.jsp?test=" + encodeURI(a);
		document.getElementById("myId").setAttribute("href", url);
	</script>
	<div>
		<p></p>
		<h4>编码与解码方法的对应关系</h4>
		<ul>
			<li>escape--------------unescape</li>
			<li>encodeURI--------------decodeURI</li>
			<li>encodeURIComponent--------------encodeURIComponent</li>
		</ul>
	</div>
</body>
</html>